package com.zkool.train.exception;

/**
 * Created by zhaokui on 2019/8/11.
 */
public class ServiceException extends RuntimeException{

    private String data;
    private int code = 500;

    public ServiceException(String data) {
        super(data);
        this.data = data;
    }

    public ServiceException(String data, Throwable e) {
        super(data, e);
        this.data = data;
    }

    public ServiceException(String data, int code) {
        super(data);
        this.data = data;
        this.code = code;
    }

    public ServiceException(String data, int code, Throwable e) {
        super(data, e);
        this.data = data;
        this.code = code;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}
